﻿<UserControl x:Class="About"
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
  xmlns:d="http://schemas.microsoft.com/expression/blend/2006"  
  xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:local="clr-namespace:Hinshelwood.TFSStickyBuddy"
  mc:Ignorable="d" Height="262" Width="391" FontFamily="Calibri">
    <UserControl.Resources>
        
        <Style x:Key="AboutButtonStyle" TargetType="{x:Type Button}">
            <Setter Property="Foreground" Value="#FFB5C8D8" />
            <Setter Property="Width" Value="Auto"/>
            <Setter Property="FontSize" Value="10"/>
            <Setter Property="FontFamily" Value="Calibri"/>
            <Setter Property="FontWeight" Value="Bold"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="{x:Type Button}">
                        <Border x:Name="bd" CornerRadius="3,3,3,3" Padding="5,0,0,0">
                            <StackPanel Orientation="Horizontal">
                                <ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" RecognizesAccessKey="True" Margin="5,1,0,1"/>
                            </StackPanel>
                        </Border>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsKeyboardFocused" Value="true"/>
                            <Trigger Property="IsMouseOver" Value="true">
                                <Setter Property="Cursor" Value="Hand"/>
                                <Setter Property="Background" TargetName="bd" Value="#FF29367B"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        
    </UserControl.Resources>
    <UserControl.CommandBindings>
        <CommandBinding Command="local:About.ShowAboutCommand" Executed="ShowAboutCommand_Executed"/>
        <CommandBinding Command="local:About.HideAboutCommand" Executed="HideAboutCommand_Executed"/>
    </UserControl.CommandBindings>
    <DockPanel>
        <!-- Header -->
        <Border DockPanel.Dock="Top" Width="Auto" Padding="5,0,5,0" Opacity="0.8" x:Name="Header" Background="{DynamicResource WelcomeBackgroundBrush}" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="1,1,1,0" CornerRadius="5,5,0,0" HorizontalAlignment="Stretch" >
            <DockPanel Margin="5">
                <StackPanel DockPanel.Dock="Left" Margin="5">
                    <TextBlock xml:space="preserve" Opacity="1" FontFamily="Calibri" FontSize="24" FontStretch="Normal" FontWeight="Light" TextWrapping="Wrap" Foreground="{DynamicResource HeaderFontColor}" VerticalAlignment="Bottom" Margin="0,0,0,5"><Run Foreground="#FFCFD3DA">TFS </Run><Run FontWeight="Normal">Sticky Buddy</Run></TextBlock>
                    <StackPanel Orientation="Horizontal">
                        <TextBlock xml:space="preserve" Opacity="1" FontFamily="Calibri" FontSize="12" FontStretch="Normal" FontWeight="Light" TextWrapping="Wrap" Foreground="#FFCFD3DA" VerticalAlignment="Bottom" Margin="0,0,0,2">Version </TextBlock>
                        <TextBlock xml:space="preserve" x:Name="uxVersion" Opacity="1" FontFamily="Calibri" FontSize="12" FontStretch="Normal" FontWeight="Light" TextWrapping="Wrap" Foreground="{DynamicResource HeaderFontColor}" VerticalAlignment="Bottom" Margin="0,0,0,2"></TextBlock>
                    </StackPanel>
                </StackPanel>
                <Button DockPanel.Dock="Right" Command="local:About.HideAboutCommand" VerticalAlignment="Top" HorizontalAlignment="Right" Width="10">X</Button>
                <Rectangle Margin="5,5,5,5" Fill="{DynamicResource WelcomeHeaderBg}" Height="69" Width="150" HorizontalAlignment="Right" />
            </DockPanel>
        </Border>

        <!-- Footer -->
        <Border DockPanel.Dock="Bottom" Background="{DynamicResource BackgroundBrush}" Height="35" Padding="5" x:Name="Footer" Opacity="0.8" BorderBrush="{DynamicResource BorderBrush}" BorderThickness="1,0,1,1" CornerRadius="0,0,5,5">
            <StackPanel Orientation="Horizontal">
                <TextBlock xml:space="preserve" Opacity="1" FontFamily="Calibri" FontSize="16" FontStretch="Normal" FontWeight="Light"  TextWrapping="Wrap" Foreground="#FFCFD3DA">Developed by</TextBlock>
                <Button Style="{StaticResource AboutButtonStyle}" Command="local:About.BrowserCommand" CommandParameter="Martin" FontSize="16" FontStretch="Normal" FontWeight="Light" Foreground="{DynamicResource HeaderFontColor}">Martin Hinshelwood</Button>
            </StackPanel>
        </Border>

        <!-- Content -->
        <Border BorderBrush="{DynamicResource BorderBrush}" BorderThickness="1,1,1,1">
            <DockPanel Background="{DynamicResource InputBackgroundBrush}">
                <StackPanel DockPanel.Dock="top" Margin="5" Orientation="Horizontal">
                    <Rectangle Margin="5,5,5,5" Fill="{DynamicResource ParaLeftBg}" Height="80" Width="40" HorizontalAlignment="Center" VerticalAlignment="Bottom" />
                    <StackPanel Margin="5" HorizontalAlignment="Center" Height="109" Width="314">
                        <TextBlock Foreground="#FFB5C8D8" xml:space="preserve" TextWrapping="Wrap" Opacity="1" FontFamily="Calibri" ><Run Foreground="#FFCFD3DA">This project will provide a configurable link between Heat ITSM and Team Foundation Server. This will allow calls to be logged by helpdesk in the standard way, while using TFS to manage the development and support work required to fix the problem.</Run></TextBlock>
                        <TextBlock Foreground="#FFB5C8D8" xml:space="preserve" Opacity="1" FontFamily="Calibri"></TextBlock>
                        <StackPanel Orientation="Horizontal">
                            <TextBlock  Foreground="#FFCFD3DA" >Website</TextBlock>
                            <Button Style="{StaticResource AboutButtonStyle}" Command="local:About.BrowserCommand" CommandParameter="" >http://hinshelwood.com</Button>
                        </StackPanel>
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Foreground="#FFB5C8D8"><Run Foreground="#FFCFD3DA">Updates </Run></TextBlock>
                            <Button Style="{StaticResource AboutButtonStyle}" Command="local:About.BrowserCommand" CommandParameter="Home" >http://hinshelwood.com/TFSStickyBuddy.aspx</Button>
                        </StackPanel>
                        <StackPanel Orientation="Horizontal">
                            <TextBlock Foreground="#FFB5C8D8" xml:space="preserve" Opacity="1" FontFamily="Calibri"><Run Foreground="#FFCFD3DA">Website </Run></TextBlock>
                            <Button Command="local:About.BrowserCommand" CommandParameter="Release"  Style="{StaticResource AboutButtonStyle}" Foreground="#FFB5C8D8" xml:space="preserve" Opacity="1" FontFamily="Calibri">http://codeplex.com/TFSStickyBuddy</Button>
                        </StackPanel>
                    </StackPanel>
                </StackPanel>
            </DockPanel>
        </Border>
    </DockPanel>
</UserControl>
